package com.mesnac.gof.pattern.observer;

import java.util.Iterator;
import java.util.List;
import java.util.Map;


public class Target {

	private List allConfig;
	/**
	 * 这里演示了，怎么调用观察者
	 * @param para
	 * @throws Exception
	 */
	public void notifyForList(Map para) throws Exception{
		Iterator it = allConfig.iterator();
		while(it.hasNext()){
			String property = (String)it.next();
			StaffingObserver ob = (StaffingObserver) getBean(property);
			if(ob != null)
				ob.update(para);
		}
	}
	
	private Object getBean(String property){
		return null;
	}
	
	public List getAllConfig() {
		return allConfig;
	}

	public void setAllConfig(List allConfig) {
		this.allConfig = allConfig;
	}
}
